package com.lagou.rpcclient.lagou.boot;


import com.lagou.rpcclient.lagou.client.RPCConsumer;
import com.lagou.service.IUserService;

public class ConsumerBoot {

	public static void main(String[] args) throws InterruptedException {
		RPCConsumer.initClient();
		IUserService service = RPCConsumer.createProxy(IUserService.class);

		while (true) {
			System.out.println("=====开始发送消息=====");
			String result = service.sayHello("are you ok !!");
			System.out.println("接收到服务端发送的消息为：" + result);
			Thread.sleep(2000);
		}

	}
}
